package com.swg.seckill.utils;

import com.swg.seckill.utils.vo.RespBean;
import com.swg.seckill.utils.vo.RespBeanEnum;
import org.springframework.util.StringUtils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ValidatorUtil {

    private static String mobile1;

    private static final Pattern mobile_pattern = Pattern.compile("[1]([3-9])[0-9]{9}$");

    public static boolean isMobile(Long mobile){
        mobile1 = mobile.toString();
        if(StringUtils.hasLength(mobile1)){
            return false;
        }
        Matcher matcher = mobile_pattern.matcher(mobile1);
        return matcher.matches();
    }
}
